package org.lds.hotkey.console.business.rule.service;

import org.lds.hotkey.common.model.dto.ResultDTO;
import org.lds.hotkey.common.model.pojo.OrderBy;
import org.lds.hotkey.common.model.pojo.PageResult;
import org.lds.hotkey.console.business.rule.entity.Rule;
import org.lds.hotkey.console.business.rule.model.request.*;
import org.lds.hotkey.console.business.rule.model.response.*;


/**
 * 基础服务类
 *
 * @author lidongsheng
 * @since 2024-06-05
 */
public interface RuleBaseService {
    /**
     * 创建
     */
    ResultDTO<RuleBaseResponse> createRule(RuleBaseCreateRequest request);

    /**
     * 批量创建
     */
    ResultDTO<RuleBaseBatchCreateResponse> batchCreateRule(RuleBaseBatchCreateRequest request);

    /**
     * 删除
     */
    ResultDTO<RuleBaseDeleteResponse> deleteRule(RuleBaseDeleteRequest request);

    /**
     * 批量删除
     */
    ResultDTO<RuleBaseBatchDeleteResponse> batchDeleteRule(RuleBaseBatchDeleteRequest request);

    /**
     * 更新
     */
    ResultDTO<RuleBaseResponse> updateRule(RuleBaseUpdateRequest request);

    /**
     * 批量更新
     */
    ResultDTO<RuleBaseBatchUpdateResponse> batchUpdateRule(RuleBaseBatchUpdateRequest request);

    /**
     * 根据ID查询
     */
    ResultDTO<RuleBaseResponse> getRuleById(RuleBaseGetByIdRequest request);

    /**
     * 根据ID集合查询
     */
    ResultDTO<RuleBaseListResponse> getRuleByIds(RuleBaseGetByIdsRequest request);

    /**
     * 根据业务主键查询
     */
    Rule getRuleByKey(RuleBaseGetByKeyRequest request);

    /**
     * 查询
     */
    ResultDTO<RuleBaseListResponse> listRule(RuleBaseListRequest request);

    /**
     * 查询所有
     */
    ResultDTO<RuleBaseListResponse> listAllRule(OrderBy orderBy);

    /**
     * 分页查询
     */
    ResultDTO<PageResult<RuleBaseResponse>> listRulePage(RuleBaseListPageRequest request);


    /***************************** 异步尝鲜 谨慎使用[性能提升10倍以上] start ******************************/

    /**
     * 异步批量创建
     */
    ResultDTO<RuleBaseBatchCreateResponse> batchCreateRuleAsync(RuleBaseBatchCreateRequest request);

    /**
     * 异步批量删除
     */
    ResultDTO<RuleBaseBatchDeleteResponse> batchDeleteRuleAsync(RuleBaseBatchDeleteRequest request);

    /**
     * 异步批量更新
     */
    ResultDTO<RuleBaseBatchUpdateResponse> batchUpdateRuleAsync(RuleBaseBatchUpdateRequest request);

    /***************************** 异步尝鲜 谨慎使用[性能提升10倍以上] end ******************************/
}